﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ColdBootNoDI
{
	public partial class Form1 : Form
	{
		public Form1()
		{
			InitializeComponent();
		}

		private void Form1_Load(object sender, EventArgs e)
		{
			Action action = () =>
			{
				var app = new WebApp(
					new Authenticator(
						new Logger(),
						new ErrorHandler(
							new Logger()
						),
						new Database(
							new Logger(),
							new ErrorHandler(
								new Logger()
							)
						)
					),
					new StockQuote(
						new Logger(),
						new ErrorHandler(
							new Logger()
						),
						new Database(
							new Logger(),
							new ErrorHandler(
								new Logger()
							)
						)
					)
				);

				app.Run();
			};

			action();

			Close();
		}
	}
}